import { defHttp } from '/@/utils/http/axios';
const baseAPi = '/MQTTServer/';
/**
 * @description: 获取MQTT主机
 */
export function getMQTTHost(data) {
  return defHttp.post({ url: `${baseAPi}GetMQTTHost`, data });
}
/**
 * @description: 新增MQTT主机
 */
export function addMQTTDriver(data) {
  return defHttp.post({ url: `${baseAPi}AddMQTTDriver`, data });
}
/**
 * @description: 删除MQTT主机
 */
export function delMQTTHost(data) {
  return defHttp.post({ url: `${baseAPi}DelMQTTHost`, data });
}
/**
 * @description: 更新MQTT主机
 */
export function updateMQTTHost(data) {
  return defHttp.post({ url: `${baseAPi}UpdateMQTTHost`, data });
}
/**
 * @description: 获取MQTT主机树
 */
export function getMQTTTree(data) {
  return defHttp.post({ url: `${baseAPi}GetMQTTTree`, data });
}
/**
 * @description: 新增MQTT通道
 */
export function addMQTTChannel(data) {
  return defHttp.post({ url: `${baseAPi}AddMQTTChannel`, data });
}
/**
 * @description: 删除MQTT通道
 */
export function delMQTTChannel(data) {
  return defHttp.post({ url: `${baseAPi}DelMQTTChannel`, data });
}
/**
 * @description: 更新MQTT通道
 */
export function updateMQTTChannel(data) {
  return defHttp.post({ url: `${baseAPi}UpdateMQTTChannel`, data });
}
/**
 * @description: 获取MQTT通道
 */
export function getMQTTChannel(data) {
  return defHttp.post({ url: `${baseAPi}GetMQTTChannel`, data });
}

/**
 * @description: 获取MQTTQos
 */
export function getMQTTQos() {
  return defHttp.post({ url: `${baseAPi}GetMQTTQos` });
}
/**
 * @description: 保存MQTT
 */
export function saveMQTT() {
  return defHttp.post({ url: `${baseAPi}SaveConfig` });
}

/**
 * @description: 新增分组
 */
export function addgroup(data) {
  return defHttp.post({ url: `${baseAPi}addgroup`, data });
}

/**
 * @description: 删除分组
 */
export function delgroup(data) {
  return defHttp.post({ url: `${baseAPi}delgroup`, data });
}

/**
 * @description: 编辑分组
 */
export function editgroup(data) {
  return defHttp.post({ url: `${baseAPi}editgroup`, data });
}
